﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class OnlineAwardsExample : MonoBehaviour
{
    public Text text;
    private void Awake()
    {
        DataHelper.InitializePath(System.IO.Path.Combine(Application.persistentDataPath, "123"));
        Debug.LogError("start");
        OnlineAwardsComponent.Inst. StartTimer(new int[] { 10, 20, 30 }, index => { Debug.LogError(index); });
    }

    private void Update()
    {
        if(OnlineAwardsComponent.Inst.GetIndex() == 3)
        {
            text.text = "倒计时结束";
        }
        else
        {
            text.text = (OnlineAwardsComponent.Inst.GetTime()+1).ToString();

        }
        
    }
}
